<template>
	<view class="paper-list uflex-a-j_fsc animated fadeInRightBig fast" @tap="opendetail">
		<image :src="item.userpic" mode="widthFix" lazy-load></image>
		<view class="paper-list-r">
			<view class="uflex-a-j_sbc title">
				<text>{{item.username}}</text><text>{{item.time}}</text>
			</view>
			<view class="uflex-a-j_sbc content">
				<text>{{item.data}}</text><uni-badge :text="item.noreadnum" type="error"></uni-badge>
			</view>
		</view>
	</view>
</template>

<script>
	import uniBadge from '../../components/uni-badge/uni-badge.vue';
	export default {
		props:{
			item: Object,
			index: Number
		},
		data() {
			return {
				
			}
		},
		methods:{
			opendetail() {
				uni.navigateTo({
					url:"../../pages/user-chat/user-chat",
					animationType:"slide-in-right"
				})
			}
		},
		components:{
			uniBadge
		}
	}
</script>

<style scoped lang="scss">
	.paper-list{
		width: 100%;
		overflow: hidden;
		box-sizing: border-box;
		flex-wrap: nowrap;
		border-bottom: 1upx solid #EEEEEE;
		padding: 20upx 0;
		> image{
			width: 100upx;
			height: 100upx;
			border-radius: 100%;
			margin-right: 20upx;
			flex-shrink: 0;
		}
		.paper-list-r{
			flex: 1;
			overflow: hidden;
			white-space: nowrap;
			text-overflow: ellipsis;
			.title{
				> text{
					color:#000;
					font-size: 35upx;
					&:last-of-type{
						color:#cbcbcb;
						font-size: 32upx;
					}
				}
			}
			.content{
				width: 100%;
				> text{
					&:first-of-type{
						flex-wrap: nowrap;
						overflow: hidden;
						text-overflow: ellipsis;
						color:#cbcbcb;
					}
				}
			}
		}
	}
</style>
